#ifndef DIALOG_H
#define DIALOG_H

#include <QtGui/QWidget>
#include <QtGui>
#include <QtCore>
#include <QComboBox>
#include "ui_dialog.h"

class Presets;
class ConversionParameters;

class dialog : public QWidget
{
    Q_OBJECT

public:
    dialog(QString colorURL, QString category, Presets *presets, QWidget *parent = 0, Qt::WFlags flags = 0);
    ~dialog();

    QScopedPointer<ConversionParameters> m_current_param;

    bool getConvert(void)
    {
        return m_toConvert;
    }

protected:
    void paintEvent(QPaintEvent *);
    void mouseMoveEvent(QMouseEvent *);
    void mousePressEvent(QMouseEvent *);
private slots:
    void onClose(void);
    void onConvert(void);
    void slotBrowseOutputPathButton();
    void slotLinkOutputPathButton();
    void slotPresetSelected(int);
signals:
    void finished(void);
private:
    Ui::dialogClass ui;
    QComboBox*  m_combobox;
    Presets *m_presets;

    bool    m_toConvert;
    QString m_category;
    QString m_extension;
    unsigned int    m_presetBaseId;

    QPixmap m_pixmapBg;
    QPoint m_pointStart;
    QPoint m_pointPress;
};

#endif // DIALOG_H
